Skip to content

The editor's inline **Ask AI** button now sends a grounded prompt to…#422

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jul 1, 2026
Merged

The editor's inline **Ask AI** button now sends a grounded prompt to…#422
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

The editor's inline Ask AI button now sends a grounded prompt to the docked terminal instead of the raw selected text. When you highlight a passage and click Ask AI with a terminal open, the running CLI receives the passage together with a reference to the document it came from (or a pointer to read the full passage via the OpenKnowledge MCP server when the selection is large), so the agent can place it in your knowledge base instead of getting an unattributed blob.

…aste (#2341)

* fix(open-knowledge): ground inline Ask AI selection before terminal paste

The WYSIWYG bubble-menu Ask AI button pasted the raw selected text into the
running CLI. It now sends the same grounded selection prompt the bottom Ask AI
composer builds (composeSelectionPrompt): the doc named as an @-mention plus the
passage inline, or a locus read-via-OK-MCP pointer when the selection is large.
Terminal reuse is unchanged; only the payload is grounded.

Adds specs/2026-07-01-terminal-ask-ai-selection-grounding and a changeset.

* test(open-knowledge): cover docName-null Ask AI fallback; use NOTE marker

Addresses PR review: adds a DOM test for the docName === null composer
fallback branch, and swaps the novel ponytail: comment prefix for the
repo-standard NOTE: marker.

* docs(open-knowledge): fix stale ponytail ref + non-Cursor threshold wording

Addresses PR review: the spec still said ponytail: (code uses NOTE:), and
both the call-site comment and spec called claude-code the 'most generous'
target when only Cursor double-encodes — every non-Cursor target shares the
same widest inline-vs-locus threshold.

* test(open-knowledge): reuse makeEditor for docName-null case; fix stale comment

Addresses PR pending recs: the docName-null test now reuses makeEditor
(widened to accept null) instead of hand-building the editor, and the
grounded-prompt test comment no longer says the host is 'mocked away' —
the real pub/sub runs; only TerminalSessionsHost is unmounted.

GitOrigin-RevId: 693c0ea134a405eb970cd3f692b35decd654fa76

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28541422150). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync
inkeep-oss-sync Bot merged commit a214bab into main Jul 1, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch July 1, 2026 19:16
@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants